package test.main;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.List;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import test.main.OS;

public class GsonRead {
    public static void main(String[] args) {
 
	Gson gson = new Gson();
	
	Type type = new TypeToken<List<OS>>(){}.getType();
 
	List<OS> os = gson.fromJson("[{\"name\":\"s\",\"detail\":\"a\"},{\"name\":\"t\",\"detail\":\"b\"},{\"name\":\"u\",\"detail\":\"c\"}]", type);
 
	System.out.println(os);
 
    }
}